<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>菜单详情</title>
<%@ include file="/view/common/tags.jsp"%>
<link rel="stylesheet" href="${sysManagerV1}/content/plugins/bootstrap-table/bootstrap-table.css"> 
</head>
<body>
	<section class="content">
    	<div class="row">
        	<div class="col-md-12">
                <div class="box">					
                    <div class="box-body">    
                    	<div class="panel panel-default" style="margin-bottom:10px;">
                            <div class="panel-body" style="padding-bottom: 5px;">
                           	 	<form class="form-horizontal" action="${sysManagerV1}/menu/update.do" method="post" id="dataForm" target="_parent">
                                	<div class="searchMenu" style="margin-bottom:0px;">
	                                    <c:if test="${menuInfo.menuFlag == 2}">
	                                    <div>
	                                        <label class="" >父节点：</label>
		                                    	<sk:select cssClass="select form-control" id="parentId" name="parentId" value="${menuInfo.parentId}"  >
		                                            <sk:options options="${parentNodes}" />
		                                        </sk:select>
		                                </div>
	                                    </c:if>
	                                    <div>
	                                    <c:if test="${menuInfo.menuFlag == 0}">
                                        	<label class="" >按钮名称：</label>
                                        </c:if>
                                        </div>
                                        <div>
                                        <c:if test="${menuInfo.menuFlag != 0}">
                                        	<label>菜单名称：</label>
                                        </c:if>
                                            <input type="text" class="form-control" name="menuName" value="${menuInfo.menuName}"  placeholder="请输入菜单名称" style="width:120px;">
	                                        <input type="hidden" name="rowId" value="${menuInfo.rowId}">
	                                        <input type="hidden" name="menuFlag" value="${menuInfo.menuFlag}">
                                        </div>
                                         <div>
                                            <label >排序编号：</label>
                                            <input type="text" class="form-control" name="orderNum" value="${menuInfo.orderNum}"  placeholder="请输入数字" style="width:60px;">
                                        </div>
                                        <c:if test="${menuInfo.menuFlag != 1 }"><!--如果是2级菜单 -->
                                        <div>
	                                        <label >链接路径：</label>
	                                        <input type="text" class="form-control" name="menuUrl" value="${menuInfo.url}" placeholder="请输入链接">
	                                    </div>
                                        </c:if>
                                        <div>
                                       		<label>菜单编码：</label>
	                                        <input type="text" class="form-control" name="menuId" value="${menuInfo.menuCode}" readonly="readonly" style="width:150px;">
	                                    </div>
                                        <div>
                                            <label>图标：</label>
                                            <input type="text" class="form-control" name="icon" value="${menuInfo.icon}" placeholder="请输入图标" style="width:200px;">
                                        </div>
                                        <div>
                                            <label >菜单描述：</label>
                                            <input type="text" class="form-control" name="menuDesc" value="${menuInfo.menuDesc}" placeholder="请输入菜单描述">
                                        </div>
                                        <sk:button rightKey="20170816152117"  type="button" _class="btn btn-sm btn-primary pull-left" onclick="update();" style="margin-left:15px;" > 
			                            	<span class="glyphicon glyphicon-save" aria-hidden="true"></span> 保存
			                        	</sk:button>
                                	</div>
                            	</form>
                        	</div>
                        </div>   
                       
                        <div class="fixed-table-toolbar">
                        	<div class="bs-bars pull-right">
		                    	<c:if test="${menuInfo.menuFlag == 2 }">
		                       		<sk:button  type="button" rightKey="20170816152157" _class="btn btn-warning" onclick="addButton('${menuInfo.rowId}')">
		                                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>添加按钮
		                            </sk:button>
	                            </c:if>
	                            <c:if test="${menuInfo.menuFlag == 1 }">
		                            <sk:button  type="button" rightKey="20170816152138" _class="btn btn-primary" onclick="addMenu()">
		                                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>添加菜单
		                            </sk:button>
	                            </c:if>
                        	</div>
						</div>  
						<c:if test="${menuInfo.menuFlag != 0}">                	
	                        <table class="table-scrollable table table-hover  table-bordered"  id="dataTable">
	                       		<thead>
	                           		<tr>
	                           			<th data-field="index" data-align="center" data-formatter="indexFormatter" data-sortable="false">序号</th>
	                                    <th data-field="menuName" data-align="center" data-sortable="true">菜单名称</th>
	                                    <th data-field="menuUrl" data-align="center" data-sortable="true">链接路径</th>
	                                    <th data-field="orderNum" data-align="center" data-sortable="true">排序编号</th>
	                                    <th data-field="icon" data-align="center" data-formatter="iconFormatter" data-sortable="true">菜单图标</th>
	                                    <th data-field="menuDesc" data-align="center" data-sortable="true">菜单描述</th>
		                                <th data-field="caozuo" data-align="center" data-sortable="false" data-formatter="buttonFormatter" >操作</th>
	                                </tr>
	                        	</thead>
	                   		</table>
                   		</c:if>
                	</div>
                </div>
                </div>  
            </div>
        </div>
	</section>
</body>
<%@ include file="/view/common/footer.jsp"%>
<script type="text/javascript" src="${sysManagerV1}/view/js/system/menu_info.js"></script>
<script type="text/javascript">
// 提示信息
var msgg='<%=request.getAttribute("msg")%>';
if (msgg && msgg!=null && msgg!='null') { 
	layer.msg(msgg);
}
</script>
</html>